package com.nisco.springboot;

import org.apache.dubbo.config.annotation.Reference;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class ConsumerApp
{
    @Reference//(url = "dubbo://192.168.56.101:20880/com.nisco.springboot.IHelloService")
    private IHelloService helloService;

    public static void main(String[] args)
    {
        SpringApplication.run(ConsumerApp.class, args);
    }

    @Bean
    public ApplicationRunner runner()
    {
        return args -> System.out.println(helloService.sayHello("Mac"));
    }

}
